import Vue from 'vue'
import Router from 'vue-router'
import mainVue from '@/view/Main'
import Index from '@/view/index/Index'
import LoginPage from '@/view/login/Login'
import UserAuthorization from '@/view/login/UserAuthorization'
import Registered from '@/view/login/Registered'
Vue.use(Router)

export default new Router({
  mode: 'history',
  base: __dirname,
  linkActiveClass: 'active',
  routes: [
    {
      path: '/',
      name: 'mainVue',
      component: mainVue,
      children: [
        {
          path: 'defaultPage',
          name: 'defaultPage',
          component: Index
        }
      ]
    },
    {
      path: '/indexShow',
      name: 'indexShow',
      component: Index
    },
    {
      path: '/userAuthorization',
      name: 'UserAuthorization',
      component: UserAuthorization,
      children: [
        {
          path: 'loginPage',
          name: 'LoginPage',
          component: LoginPage
        },
        {
          path: 'registerPage',
          name: 'RegisterPage',
          component: Registered
        }
      ]
    }
  ]
})
